Skip to content

chore(OsLogin): support common protos in owlbot.py and update generated files - #9547

Open
JoeWang1127 wants to merge 3 commits into
googleapis:mainfrom
JoeWang1127:chore/update-oslogin
Open

chore(OsLogin): support common protos in owlbot.py and update generated files#9547
JoeWang1127 wants to merge 3 commits into
googleapis:mainfrom
JoeWang1127:chore/update-oslogin

Conversation

@JoeWang1127

@JoeWang1127 JoeWang1127 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

OsLogin depends on unversioned protobuf message classes in the namespace
Google\Cloud\OsLogin\Common (such as PosixAccount and SshPublicKey),
which are generated from google/cloud/oslogin/common/common.proto.

Previously, the Bazelbot/Owlbot generation pipeline was copying Common proto files: googleapis-gen bundles all PHP proto files (Common and V1) together under google/cloud/oslogin/v1/google-cloud-oslogin-v1-php/proto/src/. Because Common and V1 are siblings in staging, synthtool's _find_copy_target algorithm visits Common/ first, fails to match version_string="v1", and aborts the search, skipping both Common and V1 proto copying.

This change updates OsLogin/owlbot.py to:

  • Move Common proto and metadata directories out of v1 staging prior
    to calling owlbot_main() in the legacy pipeline.
  • Explicitly copy common-protos via php.owlbot_copy_version() if staged
    separately by Librarian.

Also updates the generated Common and V1 proto classes and metadata to the latest Protobuf 33.2 compiler output (using public RepeatedField imports, typed array docblocks, and hex-escaped descriptor strings).

The change to PHP code is generated by running Owlbot copy:

docker run --rm --user $(id -u):$(id -g) -v .:/repo -w /repo -v ../googleapis-gen:/googleapis-gen --env HOME=/tmp gcr.io/cloud-devrel-public-resources/owlbot-cli:latest copy-code  --source-repo=/googleapis-gen --config-file=OsLogin/.OwlBot.yaml

docker run --rm --user $(id -u):$(id -g) -v $(pwd):/repo -w /repo   --env HOME=/tmp   gcr.io/cloud-devrel-public-resources/owlbot-php:latest

@JoeWang1127
JoeWang1127 requested a review from a team as a code owner August 21, 2026 18:24
@product-auto-label product-auto-label Bot added the api: oslogin Issues related to the Cloud OS Login API API. label Aug 21, 2026
@JoeWang1127 JoeWang1127 changed the title chore(OsLogin): explicitly copy common protos in owlbot.py chore(OsLogin): support common protos in owlbot.py and update generated files Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: oslogin Issues related to the Cloud OS Login API API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant